function initwenhaotype(){
	var data = ["津燃集字","津燃集办字"];
	$.each(data,function(){
		$("select[name=numbertypeselect]").append("<option value='"+this+"'>"+this+"</option>")
	});
	var zhusong = ["集团各部室","直属各单位"];
	$.each(zhusong,function(){
		$("select[name=zhusongselect]").append("<option value='"+this+"'>"+this+"</option>")
	});
}

function wenhaotypechang(){
	if($("select[name=numbertypeselect]").val() != 1){
		$("input[name=numbertype]").val($("select[name=numbertypeselect]").val());
	}
	
}

function initzhusong(){
	var zhusong = ["集团各部室","直属各单位"];
	$.each(zhusong,function(){
		$("select[name=zhusongselect]").append("<option value='"+this+"'>"+this+"</option>")
	});
}

function zhusongchang(){
	if($("select[name=zhusongselect]").val() != 0){
		$("input[name=zhusongname]").val($("select[name=zhusongselect]").find("option:selected").text());
		$.get(Ext.basePath+"tjsinfo/tjsoa/system/selectLianDongById.do",{id:$("select[name=zhusongselect]").find("option:selected").val()},function(data){
			$("input[name=zhusongidname]").val(Ext.decode(data).text);
			$("input[name=zhusongid]").val(Ext.decode(data).id);			
		});	
	}else{
		$("input[name=zhusongidname]").val("");
		$("input[name=zhusongid]").val("");	
		$("input[name=zhusongname]").val("");		
	}
	
}